Add defineDocExtension function
[searchcursor addon] Make search cursors work on docs