Update tests/Makefile; add -lpthread option