ssl_client2, ssl_server2: add check for psa memory leaks

Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com>
diff --git a/tests/include/test/psa_crypto_helpers.h b/tests/include/test/psa_crypto_helpers.h
index 8a8c37e..8e7d425 100644
--- a/tests/include/test/psa_crypto_helpers.h
+++ b/tests/include/test/psa_crypto_helpers.h
@@ -28,7 +28,9 @@
 #include "test/psa_helpers.h"
 
 #include <psa/crypto.h>
+#if !defined(SKIP_LIBRARY_HEADERS)
 #include <psa_crypto_slot_management.h>
+#endif
 
 #if defined(MBEDTLS_USE_PSA_CRYPTO)
 #include "mbedtls/psa_util.h"