Use isNaN instead of Number.isNaN.

 * Add compatibility with Safari and old Webkit browsers.