PERC: Plan-As-Query Example Retrieval for Underrepresented Code Generation