#3 copy from libWRP-GLEW and fix up