What did Republicans gain from the Compromise of 1877?