added a compatibility class using reflection to abstract over the differences between Hadoop v1 and v2