Fixes stencil buffers on platforms not supporting OpenGL 3.0 or higher.