Fix compiler errors in linux egl implementation

This pull request fixes various compiler errors and warnings I got when trying to compile the ios_and_android branch on my linux laptop. After these fixes, EGL with GLES does seem to work for me :)