[libvirt] Use flock() instead of fcntl()