Single stellar populations in the near-infrared. I. Preparation of the IRTF spectral stellar library