[libvirt] fix build failure with --disable-shared