add commonjs support
Corrected typo

An f was missing. It was just actory instead of factory
Merge pull request #9 from osartun/patch-1

Added CommonJS Support by shuvalov-anton