build: simplify Unix sockets check.

Change-Id: Ib7b8691aca2686deaadaf7215e05ad52ce950a68