LibreSSL brought X509_chain_up_ref() in 2.7.5, so no need to build our own version starting from this version.