At least 74 migrants have died after the ship carrying them was wrecked off the coast of Libya, the UN says.