MT#9319 Create mock console object if absent. For IE9-.

(cherry picked from commit 93c7aa5059db1509b0eae1588e308f1ea587489e)