Fix possible crash when gpg is upgraded to gpg-v21