Update makefile

added pthread flag