Errors in critical-angle measurement of refractive index of optically absorbing materials