Equivalent topological invariants for one-dimensional Majorana wires in symmetry class D