Extragalactic globular clusters in the near-infrared