Numerical analysis of electrically small structures embedded in a layered medium