use archive_read_next_header if archive_read_next_header2 not available