Compability with OpenSSL < 0.9.9

HMAC_* don't return error code before 0.9.9. See details here:
https://github.com/openssl/openssl/commit/87d52468aa600e02326e13f01331e1f3b8602ed0