Randomness in the choice of neighbours promotes cohesion in mobile animal groups