An improved method for the determination of the extinction coefficient of thin film materials