Accurate determination of the scattering length of erbium atoms