Don't #define isfinite to avoid pollution with std::isfinite use. Add unit test to ensure std::isfinite is available.