Mahmud II was the sultan of the Ottoman empire from 1808 to 1839