Added -lpthread when compiling with htslib