Fixed error console not defined in IE by adding defintion if missing.