When was control passed to the Mamluk sultans of Egypt