add pthread to makefile