Small build fixes to fix building for Scala 2.11.2

Fixes #15849.