Fixed errors on IE8 and IE9 due to console not being available