Fix for detecting whether console exists in IE