fix bug which was fixed in jison before: this is the origin though. fix crash in generateAMDModule() -- sync its code with the other generators.