Fix problems with 'run as JUnit test' for Grails 2.2.x.