Search for supersymmetry using razor variables in events with b-tagged jets in pp collisions at sqrt(s) = 8 TeV