fixed generated javascript module for node js use. fixes #11