Co-operative multiple inheritance in JavaScript