Export as commonjs if module is available
Fix pushstate test. The onpopstate event is fired on the pageload.
Fix IE8, can't call a function with .apply(this, null)