[Libvir] Patch to get rid of index(3) and rindex(3)