Make it work on Linux

These changes make it work with Java 6 (compiler-latest is only Java 7) and on Linux (before only OSX)

@bracki