Fix #16296 console.debug(NaN) produces error in IE9

Properly convert arguments to an Array when shimming a console function.