AMD module loader compatibility

Hi

I saw the your library is in the [Bower component repository](http://sindresorhus.com/bower-components/) but it wasn't compatible with AMD module loaders such as require.js. So I have added some lines to make the library compatible.