Fixing Java6 compilation issues