Fix for build with java 6