EU fishing ministers have reached a compromise deal on further drastic cuts to avoid the collapse of cod stocks.