Wrap generator in a skulpt function.

fixes #207