configure: Only check for hashing program if enabled

Issue #144.
configure: Add env variables for HASH and HASH_LENGTH

Issue #57.