https://stackoverflow.com/questions/11381514/undefined-reference-when-compiling-openssl
I ran into the same problem, and was able to solve it by passing adding -DOPENSSL_PIC to the config call:
-DOPENSSL_PIC
./config -fPIC -DOPENSSL_PIC