Improve make pthread linking mechanism

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
diff --git a/programs/Makefile b/programs/Makefile
index a3fa816..ebdadc0 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -139,7 +139,7 @@
 	x509/req_app \
 # End of APPS
 
-ifdef PTHREAD
+ifeq ($(THREADING),pthread)
 APPS +=	ssl/ssl_pthread_server
 endif