added `window.console` if not available, for test suite
refactored to use `deepEqual` in test suite
Merge branch 'master' into gh-pages