Simplify hash selection

The hash selection code in the configure script could be a bit
simplified. Separate the code that selects the default algorithm instead
of nesting the calls.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>