Support for Internet Explorer 8 and `attachEvent`