Don't define _PyMem_PymallocEnabled() if pymalloc is disabled

Isse #26516.
diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c
index 40c9fcd..6cf8ea9 100644
--- a/Objects/obmalloc.c
+++ b/Objects/obmalloc.c
@@ -286,13 +286,13 @@
 #endif
     };
 
+#ifdef WITH_PYMALLOC
 static int
 _PyMem_DebugEnabled(void)
 {
     return (_PyObject.malloc == _PyMem_DebugMalloc);
 }
 
-#ifdef WITH_PYMALLOC
 int
 _PyMem_PymallocEnabled(void)
 {