Add support for Mate's polkit agent.

This closes #585