Made AMD compatible for easier use with require.js
Merge pull request #2 from vzwick/patch-1

Made AMD compatible for easier use with require.js