Detect CommonJS environment in sha1.js
Merge branch 'master' into beta