in gpg 1.4.x and 2.0.x, "gpg --batch --export-secret-key" would emit an unlocked
secret key if the stored key had no password.
With GnuPG 2.1.11, the agent will prompt the user to add a passphrase to the key
before export, even if gpg had been invoked with --batch.
This causes scripts which use --batch to fail in the situation where no
passphrase is set on the key.