Added safety to ksobjc_ivarCount().

There are just too many weird cases of "classes" that don't implement ivars.