lib/crypto: Detect CommonCrypto and use it if available