AVRO-1374. Java: Fix compilation against Hadoop 2.1.  Contributed by Julian Zhou.

git-svn-id: https://svn.apache.org/repos/asf/avro/trunk@1522025 13f79535-47bb-0310-9956-ffa450edef68