Add Darwin support.
Fixup dynamic library on Darwin.
Link to the brew OpenSSL if available.