write_kafka: avoid unused function build error
Merge pull request #694 from mfournier/kafka_missing_ifdef

write_kafka: avoid unused function build error