Introduce preprocessor flag DEBUG

CPPFLAGS = '-DDEBUG' can be used to turn on debug output for library functions. This makes
packaging easier, where it's generally not desired.