Maybe not in grants, but in universities it should be possible. I assume you are belonning a bigger research group and the whole group funding is typically very heterogenious. Thus, this is more or less cultural problem (I mean the missing cultur of paying the support of the open source). The head of the research group could easily assign your FOSS costs to project/account where they are acceptable.
The other related thing I am frustrated in universitites are the burocrates who thinks that budget is some sort of whole book which cannot change. It is a plan and it should be a living document with the best current estimations, but rather it is many times treated as five years plan in communism that no matter how stupid it is we must do it because it is written in our five years plan.