sync with cocos2d/cocos2d-x