Legislative Coalitions in a Bargaining Model with Externalities