Search for narrow resonances using the dijet mass spectrum in pp collisions at √s=8 TeV