old_hmac_encode: check for NULL result when allocating *pder