Fixed an error caused by IE7 having no window.console object.