Safeguarding System Prompts for LLMs