Added polyfill for IE8 and below to use addEventListener