Destroy mutex on close
Win32 fixes