Some code that ensures that window.console not crash in browsers that do not support window.console