Accurate determination of optical constants of absorbing materials: measurements of transmittance and reflectance of thin films on partially metallized substrates