Correct work with memory under WP8
Add check into memory allocation
Add function prototype
Redefine char16_t for WP8
Compile Spidermonkey as static library