Improved detection of already running gpg/ssh agent.