Small fix for IE versions where `addEventListener()` is not defined.

Use `attachEvent()` instead.