Remove |main| call in generated modules without the |main| method

Fixes #21.