Switch generateMipmap to the new OpenGL 3.0 functionality

HOpenGL's generateMipmap function was bound to the texture environment state variable introduced
in OpenGL 1.4 and subsequently deprecated in OpenGL 3.0. It is removed altogether in OpenGL 3.1 and
may cause confusion with glGenerateMipmap. This new function was introduced to allow automatic
mipmap generation.

See http://www.opengl.org/wiki/Common_Mistakes#Automatic_mipmap_generation