Support non-standard scala binary versions (2.3.x)

Backport of #3735

See https://github.com/scala/community-builds/issues/84