Modal analysis of arbitrary-shaped 2D periodic structures printed on a grounded dielectric slab: Real and complex solutions