Reverted changes to be compatible with official cocos2d-x branch.