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.