Near-infrared spectroscopy of a large sample of low-metallicity blue compact dwarf galaxies