fix build with ghcjs