You can always choose not to hold the UN vote once you build it y'know.
Anyways, if you don't want someone else building it and losing to diplomacy, then of course you build it and keep it for yourself. Just as a side note, UN victory is one of the hardest victory conditions besides cultural victory in my opinion, namely because you have to control a sizeable amount of land and still have enough -good- friends to vote for you. I've only won through UN 2 out of the 4 times I've used it, simply because either a) the other person has more friends or b) everyone has a negative opinion of me. Go figure