make hmac (mostly) compatible with stdlib hmac