Fix build problems without -DDEBUG