Fix Java compilation on Travis CI