CMA CGM confirms mega-ship order, swings to profit