fix isfinite -> std::isfinite, missing from merge