[mode-base-cluster]fix: build error while not enable On/Off cluster server (#28388)

* fix build error while not enable onOff cluster server

* fix include file bug
diff --git a/src/app/clusters/mode-base-server/mode-base-server.cpp b/src/app/clusters/mode-base-server/mode-base-server.cpp
index d2e56f1..4495e72 100644
--- a/src/app/clusters/mode-base-server/mode-base-server.cpp
+++ b/src/app/clusters/mode-base-server/mode-base-server.cpp
@@ -23,6 +23,7 @@
 #include <app/clusters/on-off-server/on-off-server.h>
 #include <app/reporting/reporting.h>
 #include <app/util/attribute-storage.h>
+#include <app/util/config.h>
 #include <platform/DiagnosticDataProvider.h>
 
 using namespace chip;
@@ -193,7 +194,7 @@
             }
         }
     }
-
+#ifdef EMBER_AF_PLUGIN_ON_OFF_SERVER
     // OnMode with Power Up
     // If the On/Off feature is supported and the On/Off cluster attribute StartUpOnOff is present, with a
     // value of On (turn on at power up), then the CurrentMode attribute SHALL be set to the OnMode attribute
@@ -227,7 +228,7 @@
             }
         }
     }
-
+#endif // EMBER_AF_PLUGIN_ON_OFF_SERVER
     return CHIP_NO_ERROR;
 }