In the file \.kobo\Kobo eReader.conf, add this:
[FeatureSettings]
ExportHighlights=true
(The heading "Feature Settings" may already be there.)
Make sure the lines have Linux/Mac style line endings (just line feeds, no carriage returns), not Windows style (which has both line feeds and carriage returns). Editors such as
NotePad++ (free) can do that.
Then, in the Kobo Readers "My Books" setting, you'll find an "Export Annotations" option on the "..." menu for each title.