[perl #120543] work around a C++ library bug in VC 2003

VC 2003 makes overloaded versions of ldexp() available when including
<math.h> which should only be visible when including <cmath>.

The cast ensures the ldexp(double, int) signature is used.