remove unnecessary -lcrypto when targeting darwin

When building for OS X or iOS platforms, linker flags `-lcrypto` is not needed since we'are using not openssl but  Common Crypto.

And since Apple's iOS SDK does not ship with openssl by default, there will be an error while building for iOS platforms.

This patch adds a check and skip `-lcrypto` for darwin targets.