Apply a fix which prevented to use -DGL_GLEXT_LEGACY, -Werror and -Wundef to be used together. This produced a build fail on any software meeting these requirements.