Adapt to API changes in rpm.4.12