Fix polyglot for firefox 30.0a1 (2014-02-17).

Apparently the WebIDL spec calls for `addEventListener` &c. to sit on the global
object.  I have not verified, but it doesn't make a difference: we can just as
easily extend `window` as `Window.prototype` and this will work with the current
(and future) Firefox behaviour.

Fix #18.