Fixed compilation issues with Java 6