Add O2 and DNDEBUG flags to libcapnp build