Android: fix emulator for OpenGL ES 2.0

Current HEAD crashes in examples when running android emulator, this fixes it.
See the forum http://www.cocos2d-x.org/boards/6/topics/12563?r=25446#message-25446
Code taken from forum post by Romain TISSERAND

I haven't done many github pull requests, so I botched the "Merge branch mchinensedit" commit message and as a result I think you'll see two duplicate commits.