Update tests/Makefile; use -pthread option instead of -lpthread