Convince your company to contribute back to the libraries they use?
Otherwise donations and bounties are a good way.
Hackathons are a poor way to do that, as it's often on the whims of random egocentric judges pushing their own agendas and not interested in the tech itself.
Man it is hard to do. It is about the same amount of work to spend $200 as it is $2,000,000, and that is really tricky for community supported (free as in beer) versions. If there is a commercial license - like one has AGPL or paid something else, or extended support for versions - that is much easier to purchase.