Limitations of the two-media approach in calculating magneto-optical properties of layered systems