Made changes to allow compile on Centos and openssl