Ambiguity-Aware In-Context Learning with Large Language Models