Fix MSVC build (std::isfinite not available)
'Fix' MSVC 'performance' warning