Put the #ifdef __GHCJS__ as it is still needed for TH