patch to correct bitsTo behavior wrt NaN canonicalization