[libvirt] [PATCH 2/5] build: replace redundant header check with function check