Particle-particle random-phase approximation applied to beryllium isotopes