Another attempt to fix the Windows and Mac builds by providing our own nan/infinite tests.