A comparative study of the magnetoelastic properties of the YFe10V2 and NdFe10V2 compounds