Automatic Prompt Optimization for Knowledge Graph Construction: Insights from an Empirical Study