Fix IE8. It does not have window.addEventListener