GL debug option and bug fixes.

New cmake option to disable use of vertex_array_object.

Made the glGetAttribLocation code path work on OSX.
Added missing modified-check for spritesheet code generator