Don't use PyOS_strnicmp for NaN and Inf detection: it's locale-aware.