fix redefinition of define
update generate.js to process latest header; regenerate