Libya to buy stake in Egypt's Midor oil refinery