Fix compatibility of hamcrest with java 6