revert some of pull 180 to allow builds with java 1.5