South Africa has negotiated a settlement with the European Union to clear hundreds of shipping containers of citrus fruit stuck in EU.