A mean ergodic theorem in Banach spaces