cross-window fix 2

- Learned that, depending on the browser, window.constructor may not be
the same across windows.