Two-spin entanglement induced by electron scattering in nanostructures