Polyfill HTML5 History API

Work to polyfill HTML5's History API with onhashchange (not yet ready
for IE8)