Optimize scrypt (~50%) and support for Python 2.1