Fix compile error with OpenGL and latest mem changes.
Fix errors in OpenGL code when compiling in C mode.