ssh: Fixed build on platforms where R_OK is not defined

Bug: http://curl.haxx.se/mail/lib-2014-11/0035.html
Reported-by: Jan Ehrhardt