For anyone reading this and finding that everything above is not working, note that this solution is what worked for me. What is crucial is that the symlinks go to the place where homebrew has in fact installed your openssl libraries.