IE8+ related fixes

- Add another check to eliminate that undefine object error.
- Add fake console.
Changelog.