make hmr() compatible with Hadoop 2.x