Generalized build script to cross-build for different Scala versions