According to the website of the Brazilian Consulate-General in Washington:
There is no need for a visa if the traveler arrives in Brazil on a flight, remains in the international transit area, without passing through immigration control, and departs on another flight from the same airport.
Note, however, that this may be a problem if you have baggage and you are traveling on two separate tickets (i.e. if your bags won't be checked all the way through.) In many countries, this would require passing immigration (and customs) to claim your bags and then checking them back in with your next airline. This would indeed require a visa. Furthermore, your first airline might refuse to even allow you to board if your ticket is just going to Brazil and you don't have permission to enter Brazil. You'd need to check with your specific airlines regarding both of these issues. If they have a way to check your baggage all the way through and see proof of your onward tickets to the U.S., this might work. Of course, you'd probably have the best luck if it's the same airline and/or if they're part of the same alliance (and thus have interlining agreements.) You'll definitely want to check with the airline before trying this, though.
One possibility here would be to check with the airline of your existing reservation and see if you can change the ticket to originate in Lima instead of in Rio. Transit shouldn't be a problem if you have the same ticket all the way through (and even less of a problem if they just change your flight to one flying directly to the U.S. from Lima.)