Make exporting dynamic, (fixes #5)