Fix the isfinite() call to std::isfinite()