Simplified mutex-related code in Windows shutdown