Fix iOS/OS X GL_ASSERT in release builds

Xcode doesn't define NDEBUG in release mode so, glGetError is called after every GL call even in release builds.
Merge pull request #1628 from rgngl/patch-1

Fix iOS/OS X GL_ASSERT in release builds