patch 8.2.4038: various code not used when features are disabled

Problem:    Various code not used when features are disabled.
Solution:   Add #ifdefs. (Dominique Pellé, closes #9491)
diff --git a/src/crypt.c b/src/crypt.c
index 5a83588..85ff33a 100644
--- a/src/crypt.c
+++ b/src/crypt.c
@@ -247,6 +247,7 @@
 }
 
 
+#if defined(FEAT_SODIUM) || defined(PROTO)
 /*
  * Get maximum crypt method specific length of the file header in bytes.
  */
@@ -265,6 +266,7 @@
     }
     return max;
 }
+#endif
 
 /*
  * Set the crypt method for buffer "buf" to "method_nr" using the int value as