Split window.console OR logic into two if statements to handle IE8 error