[3.0] Fix build error when using --enable-debug option