Fix base64 encoding on Node.js

Browser-based base64 encoding uses window.btoa(), which isn't
available server-side. Detect when window.btoa() is unavailable and
use new Buffer(str).toString('base64') as a fallback. As long as the
execution environment is either a browser or Node.js, this should work
fine.
Tell browserify not to include buffer shim
Merge pull request #3 from btmills/btoa

Fix base64 encoding on Node.js