Make --enable-stats build.

Added includes and fixed preprocessor macros so that main-stats and wiz-stats compile.