Fix error checking bugs in load_shader.

This code was failing on Android because of an error flag set during an
earlier operation (`enable(TEXTURE_2D)`).  The logging was also broken because
get_error was called twice.
Fix compiler warnings on Android