adding -lpthread to Makefile