Application of the Green and the Rayleigh-Green reciprocal identities to path-independent integrals in two- and three-dimensional elasticity