Fixed build with SMALL=1
Improvements in hashlib