Fixed bug when loading in browsers via require.js / jam.js

The code assumed that if `require()` is defined then `require('buffer')` 
will work, but in require.js-driven browsers, that call will throw an 
exception unless you happened to have already loaded a library named 
`buffer`. 
Merge pull request #1 from nfriedly/master

Fix for errors when loading in browsers via require.js / jam.js