Fix mixed Java/Scala compilation