kafka: fix compilation for older versions of librdkafka

Since commit f505691270f2317291c372fd5f004a4ffbce9f9a, kafka module was
broken. Enable definition of `kafka_log()` when using kafka logger
callback as well.