Fixed NullReferenceExcepton in Socket.Connect for non-IP endpoints

Socket.Connect(EndPoint) throws a NullReferenceException when connecting to non-IP (eg Unix) endpoints in Dgram mode.
Merge pull request #1124 from UCIS/patch-5

Fixed NullReferenceExcepton in Socket.Connect for non-IP endpoints