Browserify compatibility

The check for AMD loading wasn't strict enough
Merge pull request #254 from joeybaker/patch-1

Browserify compatibility