Calculations of voltages for magnetotelluric modelling of a region with near-surface inhomogeneities