Calibration of optical systems for linewidth measurements on wafers