Cleanup build warnings

Tested against Hadoop 1 and Hadoop 2