Add -lpthread to linker flags to allow to run with samtools 0.1.19.