Adjusting to build with Java 6