How did the Mamluk Empire based in Egypt become the