Infrared Spectroscopy of Ultracompact H II Regions