fix bug: SPARK-2815

Compilation failed upon the hadoop version 2.0.0-cdh4.5.0