Be less restrictive when looking for command classes

Accept any class that implements ac, instead of only classes that
extend z.