Python 2.6 doesn't enumerate hash algos
Python 2.6 compat fixes