Add casts to correct return type in macros for missing libm funcs