CMake: Define zlib vars before including libarchive

zlib isn't detected by libarchive if it's defined after adding
libarchive as a subdirectory