Fix win32 window not closing when destroying it