fixing isnan to std::isnan

Minor edit to fix issue on some compilers.