Compatibility layer for Scala 2.11 and Java 8