Improved procedure for calculating the collision stopping power of elements and compounds for electrons and positrons