Restore support for using ghost as a npm module fixes #1326
Merge pull request #1569 from hswolff/ghost-module-support