Determination of the \bar K^0 d scattering length from the reaction pp \to d \bar K^0 K^+