Preventing flicker when closing OSX openGL windows.