print debug messages only when NDEBUG is not set

It would be nice if this library in release variant does not print debug messages. I've added a number of ifndef's to do so.