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