libks: fix compilation without deprecated OpenSSL APIs