feature detect addEventListener and use attachEvent if it isnt present, fixes issue in IE8