Fix build
Fix namespace issue on isnan/isinf on OS X