Fix for console not defined error on IE