Adding -lpthread to compile.sh