fix error on IE versions lower than 9

The Element.addEventListener() and Event.preventDefault() methods are
not supported for Internet Explorer lower than version 9. IE8 and lower
use Element.attachEvent() and Event.cancelBubble/returnValue for the
same results.