Use JavaScript's brand of object-orientation in Scala