Fix problem with detect libcapnp function