Fix client-side logging in IE9

In Internet Explorer 9, console.log (and similar) do not support `apply()`.

This commit introduces *a lot* of duplication, and I'm not even convinced it works (particularly well, or at all). But I don't have enough knowledge about what the client-side logging is meant to be doing.

See #771 for when this was introduced and http://stackoverflow.com/a/5473193/127687 for more info.