isnan fix for msvc