GM5 compatibility plugin.

This contains the first working subset of functions I've got for GM5 compatibility. Most of them are drawing-related.
As always, comments are welcome.

Tested on Windows and Linux, OpenGL1, OpenGL3, and DirectX9.