Spidermonkey should be built in RELEASE mode for all platforms.

Relevant issues were created at 
http://www.cocos2d-x.org/issues/3853
http://www.cocos2d-x.org/issues/3857

REASON WHY WE HAVE TO USE RELEASE VERSION LIBRARY
We used fat library for iOS, it contains i386, armv7, armv7s architecture. But we use the same header files.
The head file of Spidermonkey contains DEBUG macro in some methods or some classes. It may lead to weird crash.

HOW TO FIX:
Undefine all DEBUG marcos in Project Settings.
Build all libraries in RELEASE mode.
If you wish to debug Spidermonkey, you have to know how to build debug version of SpiderMonkey and how to set DEBUG macro in Project Setting!

BUT DON'T DEFINE `DEBUG` macro IN OUR PROJECTS

Cocos2d-x is using COCOS2D_DEBUG for debugging.