Compensation of errors due to discretization, domain truncation and unknown contact impedances in electrical impedance tomography