jscript: Better handling of to_integer result in Array.splice.