agent: Improve concurrency when Libgcrypt 1.8 is used.