Watch Out for Your Agents! Investigating Backdoor Threats to LLM-Based Agents