Study of the Λ–Λ interaction with femtoscopy correlations in pp and p–Pb collisions at the LHC