Need to put -pthread for gcc 4.9