Cohomology with coefficients in stacks of abelian 2-groups