Fix check for Scala version in build matrix