pkg.main will always be defined; fixes #14