Update Makefile

Added pthread flag