Trade Restrictiveness Indices in Presence of Externalities: An Application to Non-Tariff Measures