Fix error during shutdown on OSX

We were removing the Window from TLS and thus destroying it after terminating the windowing system, which caused an error due to calling a glfw function when it was not inititalized.