Fix tests broken by undefined `window` references in ReactEventListener.

This test breakage blames to e1c2d02fddb40cb0b246d2c2da97b41b6ba378bc.

cc @petehunt
We've been trying to keep React compatible with CSP restrictions preventing eval. Can we do `global || window || self` or something?