Changes for SpiderMonkey build on BSD-systems.

I haven't tested it and I don't know if it works. It probably has a higher chance of success than the previous version... ;)