RTS changes for profiling support

See also https://github.com/ghcjs/ghcjs/pull/192