Fix eClose handling on IE8.

Use attachEvent for IE8