Massive port strike averted, mediator says