Update port.c

::isnan() and ::isinf() not defined on FreeBSD. Updated lines 517, 533 and 561 to recognize isnan() and isinf() instead.
Merge pull request #2994 from AndrewEdwards/master

Update port.c