Network backend: Protect with a mutex only if pthread.h is available

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Makefile: Default prefix to /usr, and also clean the "examples" dir

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>