add std types to module context before calling onGenerate callback (closes #1904)