Add support for building opengl on both Mac and Linux