support GHCJS, which does not have a GHC.Event IO manager

GHCJS does not have `GHC.Event.Event` when targeting JavaScript (It might have it when compiling native code (which it does for Template Haskell support), depending on the operating system). This small patch makes it work, `ghcjs_HOST_OS` is defined when the target is JS.