How did railroad companies solve the problem of too few workers to help build the tracks?