a lot of compilation issues
definition files
imap lib compilation fixes
last non-d.ts compilation error