Detect libsocket and libnsl automatically
Merge pull request #1561 from cmouse/detect-socket-and-nsl-lib

Detect libsocket and libnsl automatically