Differential inheritance in JavaScript