fix bug for Safari of WIN.

When Object was injected into the attachEvent methord, it will result in TypeError in the safari browser for windows.