Updated makefiles to include pthread