Fix building with GHCJS