Move Hive version compatibility code into shims (issue #27)