Shouldn't this be -lpthread?