VC++ compatibility for isnan fix