Fix building with ghcjs