libarchive: fix thread autodetermination for zstd compression format
The libarchive code uses sysconf(3) to determine the number of threads
when 0 has been given as the number of thread to use
MFC after: 3 days
(cherry picked from commit a25e0ba57ee17e75ab27fdc09ac3275a8215087e)