Heterocyclic compounds used in the treatment of kinetoplastid infection and their preparation