fix for addEventHandler() obj attribute check

- In addEventHandler(), the check to see if the obj argument is valid
doesn't work if the object is in a different window. If obj is in
another
window, it isn't an instance of this window's Object(); it is an
instance of the other window's Object(). (I wasn't aware that they were
different until now.)
fix for cross-window Window object comparison

- Learned that window.constructor is not the same between windows. Using
Object.prototype.toString.call() for comparison instead.
cross-window fix 3

- Not all browsers return "[object Window]" for window.toString()
cross-window fix 4

fixed the problem in removeEventHandler() as well
Merge branch 'master' into drag-event-attributes