Fixed pthread linking in makefile