Support es6 export

Fixes #7