Updated the iOS backend, fixed some misuses of the gl flags