build: Removing unnecessary dependencies for UNIX sockets detection

Change-Id: Icbac9d5544414aab459c959f7ca8f48b6eb17a2f