Fix compilation with OpenGL 3+

Signed-off-by: Harm Hanemaaijer <fgenfb@yahoo.com>