jscript: Correctly handle NaN in to_integer.