Allow curl digest feature to build against older libcurl versions

@fcorneli would you mind having a look at this patchset ? Thanks !