fix access to console methods in IE9 and IE10

[#46432285]

The console.log function supplied in IE9 and IE10
when the debugging tools are enabled is not based
on a real ECMAScript function and does not have an
apply method.

This caused an error when trying to debug other script
problems in IE9/IE10.

See:
http://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function