Fix ssl-linking/dependencies-issues on rhel distros.

Hey, 

Sorry for the mess. First time with git (and github). I'm not really sure what went wrong in my last attempt.  
Anyway, I hope this pull request is better. 

Best regards, 
Patrik Martinsson