Measurement of WZ and ZZ production in pp collisions at $\sqrts = 8\,\text TeV$ in final states with b-tagged jets