[libvirt PATCH] tests: fix mocking on macOS