backport from trunk (rev #5160):
The patch adds additional locations where ssl includes and libraries might
In particular, after installing openssl in solaris, from sources, DEFS
needed to be edited so that compilation do not be broken.
Closes patch 2494156.
Credits go to Sergio Gutierrez .