[fixes #48] Fixed the issue where the global event variable was being overwritten in IE.