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

(cherry picked from commit 93c7aa5059db1509b0eae1588e308f1ea587489e)
(cherry picked from commit 75767e4a389f68cb705c3c9c02bf921cbcac16b4)