use Homebrew openssl if available

Fixes #343, references #367
Merge pull request #376 from mislav/brew-openssl

use Homebrew openssl if available