spline/bezier fix and support flat shading

It's not really a requirement for merging this pull request. I would be happy if you just #ifdef out the flat shading functionality for now in #ifndef USING_GLES2, effectively disabling it on mobile but still keeping everything else working.