Switch to homemade isinf/isnan implementations.