patched from nathan's version to support scala 2.10 and kafka 0.8.x