Backport fix from master to 2.2.x so that scala-library can be found