Fix issues in detecting/linking for ssh-agent support

Remove empty variable, prevent detection of ssh-agent when $SSH2_DIR is in use
Remove whitespace
Remove duplicate parameter