XS implementation of parts of Class::Load