Update Codefolding for 3.x changes

- test if version is really 3
- fix missing `var` declaration
- change require call so addons will be found again