Fix compilation for Scala 2.11

There are still a ton of warnings.