TRQ-2594. Port using the munge API.

Lukasz Flis contributed making munge use the API to the 2.5 series of
code, and I am getting this into our newer codebases now.