The opposition has accused Labor of potentially damaging Australia's relationship with the US after a crucial UN vote.