Fixed some jdk7 related compile issues