check whether mixin is in inherited chain of child class
function subOf(child, mixin) {
  if(child === mixin) return true;
  if(child && child.constructors) {
    for(var i in child.constructors) {
      var parent = child.constructors[i];

      // avoid dead loop
      if(parent === child) continue;

      if(parent === mixin) return true;
      if(subOf(parent, mixin)) return true;
    }
  }
  return false;
}