Set moduleName when modules option is 'inline'

Fixes #1282