Measurement of top quark–antiquark pair production in association with a W or Z boson in pp collisions at √s = 8 TeV