Sox, Ortiz agree to two-year, $26M deal