Link against libsocket and libnsl on Solaris

Fixes #21
Use openssl binary of no base64 binary is available

Suggested by maxfieb (#21)