Workaround Win32 apps sometimes hang on exit.