Extending Context Window of Large Language Models via Semantic Compression