add ifdef guards for generated ES/ES2 wrappers
fix wrap header includes