I've been in that situation on customers' bikes before. One possible workaround would be to
1. get a dowel in a size the light's mount can clamp onto
2. bore a hole through the dowel that's the size of the rack leg. The hole doesn't even have to be on-center or coaxial.
3. Now saw the dowel in half, down the center of the drilled hole, and use it to shim the rack leg up to the size the light wants. Obviously some friction material will be needed, perhaps some rubber cement.