Bug 974739 - Fix non-threadsafe build errors in the SpiderMonkey shell, r=bhackett