Porting changes.
Make P4/Perl build with ActivePerl > 623. They've
messed up the PerlIO headers now so you can't use fprintf in an XSUB
anymore. Also they're now including math.h and on Windows that must be
included with C++ linkage so we now include it before we include the other
perl headers that have to be included with C linkage.