Added -pthread to the CFLAGS