Coupling between electronic and structural degrees of freedom in the triangular lattice conductor NaxCoO2