Fixed broken export_func

Fix for https://github.com/fish-shell/fish-shell/issues/573