JS: fix getpid (fix #23399)
Bug introduced during the conversion from GHCJS. It's weird that it hasn't been caught earlier. I've added a test.
Bug introduced during the conversion from GHCJS. It's weird that it hasn't been caught earlier. I've added a test.