tools: cmake: fix compatibility with LibreSSL as well