Applied a part of gorzuate's patch for OSX compilation

Made the GL calls be done after SDL_SetVideoMode() as it seemed to be
needed on mac.

Also tested it on Windows and Linux.