Fix building against openssl 0.9.8

Closes #1221