Computing the elasticity of a Krull monoid