Fix Various JS compile error on ios platform.

Fix Various JS compile error on ios platform.