updated to support latest cocos2d-x