Cocos2d-x: changes for JSB support.