Mexican president reverses course after Trump threat