Fix compilation errors that occur in Scala 2.10.2 or later.