Added AMD support.
Boilerplate code copied from: https://github.com/umdjs/umd/blob/master/amdWeb.js
Merge remote-tracking branch 'upstream/master' into amd

Conflicts:
	index.js
Merge pull request #49 from deciob/amd

Added AMD support.