Unpack SO_PEERCRED structure depending on OS

OpenBSD uses a different structure to pass credentials, make
authentication socket credential detection more robust and OS dependent.
Merge pull request #2 from dlundquist/fix-openbsd

Unpack SO_PEERCRED structure depending on OS