Added go 1.1 compatibility for the sha1 and sha256 calls.

As requested, here's the changes that I believe work with go1.1 and go1.2.