Fix compilation errors occurring when debug log messages are active.