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

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

(cherry picked from commit 97861d95302c4e4e08de697dc563f9a0786e1d8d)