Makefile pthread linking fix