Fix compiling from Gradle command line