Compatibility with scala 2.10

This pull request fixes compatibility with scala 2.10.