fix for sha bug on pythons<=2.4