Ewen's sampling formula with population structure