Two freight trains carrying toxic chemicals have crashed head-on in the US, killing two people and injuring two others.