set default extensions when using in module and not as script
don't override existing String prototype method. doing so breaks code in other
modules.
Merge pull request #19 from vicapow/master

set the extension defaults when being used in a module