Added -pthread to CFLAGS for linux