Merge pull request #3 from natural-law/develop

Fix the messy code in plugin.
Merge pull request #4 from natural-law/develop

Make the plugin be compatible with both cocos2d-x-2.2 & cocos2d-x-3.0.