Comparison of coronal holes observed in soft X-ray and He i 10 830 Å spectroheliograms