Darvish, Rangers reach agreement