libm: Provide fallback definitions for isnan() and isinf()