I\'m dealing with a system where the following Javascript code (which is out of my control) is being executed early in the page
if (!(\"console\" in window)
I believe you could possibly do this with an iframe inject and then copy the iframe's console object:
http://jsfiddle.net/nmY6k/
Note, this is just a demonstration that the concept should work.
EDIT
With a pure JS iframe:
http://jsfiddle.net/nmY6k/1/
EDIT
And of course, if you need to remove the iframe element afterwards: