native: fixup #1145: function declaration

Clashes with #1119. Compare #1170. Please speedy-merge.