Alternative to window.addEventListener for IE 8

Check if the browser is IE 8, and if so replace the unsupported `window.addEventListener` and `hashchange` event.