Optimal quasi-market choice in the presence of pollution externalities