Fixes #1732. Fixed bug related to JS `console` object in MSIE 8 and 9.