Length Generalization of Causal Transformers without Position Encoding