Remove usage of deprecated libarchive function

Add macro for older libarchive support like in FreeBSD 9 and FreeBSD 8

Conflicts:
	libpkg/pkg_repo.c