When did labor unions begin to gain some legal rights in the United States?