Fix debug messages to compile on MSVC/GCC