Don't build the UN unless you've aligned yourself with enough civs (usually 2 - 3 large ones / 3 - 4 smaller ones, or a generous mix of large/small). That's basically the only thing i can think of. If the AI favors the UN and will build on its own (the AI in warlords/vanilla rarely places major importance on Mass Media) make sure you are poised and ready to reduce his population significantly and/or take the city in which the UN was built (using your not-so-diplomatic methods). Also, align yourself fully with the obvious UN builder's enemies if this is a recurring problem IE if Mansa Musa has furious relations with Ragnar, and you are pleased with Ragnar, try your best to get on friendly terms. Now you can count on a war ally (with a gifted tech usually)