Measurement of complex permittivity and permeability and thickness of multi-layered medium by an open-ended waveguide method