Determination of the 4f shell magnetic moment in cubic rare-earth intermetallic compounds