Make url_rule_to_js consistent with url_for