fixes for calling haskell from JS using JSC