Add missing gcc option -pthread to build correctly