Fixes failing tests in PHP 5.3 from f942de6.

No math required to check if NAN is identical to a value.