Fix CI errors related pkcs5_pbe changes

Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
diff --git a/library/pkcs5.c b/library/pkcs5.c
index 6a4b3b0..bbbe82c 100644
--- a/library/pkcs5.c
+++ b/library/pkcs5.c
@@ -211,6 +211,7 @@
         goto exit;
     }
 
+#if defined(MBEDTLS_CIPHER_MODE_WITH_PADDING)
     /* PKCS5 uses CBC with PKCS7 padding (which is the same as
      * "PKCS5 padding" except that it's typically only called PKCS5
      * with 64-bit-block ciphers).
@@ -222,13 +223,14 @@
      * case, it ignores the padding, and so will never report a
      * password mismatch.
      */
-    if (mode == MBEDTLS_DECRYPT)
+    if (mode == MBEDTLS_DECRYPT) {
         padding = MBEDTLS_PADDING_NONE;
+    }
 #endif
     if ((ret = mbedtls_cipher_set_padding_mode(&cipher_ctx, padding)) != 0) {
         goto exit;
     }
-
+#endif /* MBEDTLS_CIPHER_MODE_WITH_PADDING */
     if ((ret = mbedtls_cipher_crypt(&cipher_ctx, iv, enc_scheme_params.len,
                                     data, datalen, output, &olen)) != 0) {
         ret = MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH;