Add threads. Does not complile using MingW g++