In-context Learning in Presence of Spurious Correlations