agree with fnord on that.
If i've flopped a set with cards like that on the board then i'm staying in. you've still got 2 cards coming to pair up the board to beat about anything out there.
as much as I hate to say it, my best move would have been to fold the river and keep fighting with whatever I had left.