Fix throw when libarchive handle is not allocated