Fix build failures with Mesa 10.3.1

Newer Mesa looks buggy, several errors like this one are reported:
 /usr/include/GL/glxext.h:480:143: error: ‘GLintptr’ has not been declared
 typedef void ( *PFNGLXCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
Work around this issue by defining GLX_GLXEXT_LEGACY.

Fix issue #534.