Fix #910: Add support to export named parameters to JavaScript

@sjrd is this right?