Window unresponsive on OSX when rendering from another thread