First-principles study of the electronic stopping power of indium for protons and He ions