The US has warned it will take legal action if Mexico presses ahead with an import ban on GM corn.