Patch to work around upstream bug in calls to __builtin_nan(...)