misc additions to make libRegal.dylib work as a drop-in replacement for OpenGL on mac