Approximation of finitely additive functions with values in topological groups