fixed pthread links in makefile