nrpe: fix system openssl linkage

Closes #35024.
For explanation of the code comment here:

#8740