Fix the static build
For some reason, the debug header was left out, causing build failures. This fixes that omission, and guards the include (because it's explicitly only used in the static builds... don't want to add new warnings about unused includes)