Evaluating In-Context Learning of Libraries for Code Generation