Added -lpthread flad to makefile