Some versions of HP-UX do not define 'isfinite' or 'finite' in math.h for Itanium when preprocessing with C++, so we have to add the definition ourselves instead to map to the internal version.
Newer AIX and HP-UX platforms provide 'isfinite' as a <math.h> macro. Older versions do not, so add the definition if it is not provided.
Solaris provides a 'finite' function in <ieeefp.h>.
The glibc 2.1 headers provide isfinite only in C99 mode. Add its definition ourselves.