fixed #7823 for cocos2d-x 3.x