Support AMD

Added an export module, because the original state-machine.js supports AMD, which feature was not available from TypeScript before this patch.
Merge pull request #1772 from balassy/patch-2

Support AMD