Changed check for math.h on isnan & isinf define to check specifically
for macro define, as older versions of math.h may be presnt but may not
define these.