some minor changes to compile for raspberry pi GLES2