Determination of the neutron-neutron scattering length from the reaction π− + d → 2n + γ