fix build errors against GL in OSX