Fixed building problems on JDK7