The settlement got here sooner than anticipated, overcoming earlier opposition from Hungary’s Viktor Orban.