Shaf: Use implicit defs instead of classes for scala 2.9 compatibility