fixes to allow building without opengl