lib: make debug macro more solid when CONFIG_DEBUG is not defined

Signed-off-by: Viller Hsiao <villerhsiao@gmail.com>