add check for pcap.h in configure.ac
add pthread check only for thread mode