Remove explicit linking of PThread in make

This would break platforms that do not have pthread. Put the linking
instead behind a define and add this define where required to all.sh.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
diff --git a/tests/Makefile b/tests/Makefile
index bcc3b93..72429a6 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -57,8 +57,11 @@
 DLEXT ?= so
 EXEXT=
 SHARED_SUFFIX=
+
+ifdef PTHREAD
 LOCAL_LDFLAGS += -lpthread
 endif
+endif
 
 ifdef WINDOWS
 PYTHON ?= python