Fix use of 'window' in CompositionEventPlugin

access to `window` needs to be guarded by `ExecutionEnvironment.canUseDOM`.