Mechanical behavior of carbon nanotubes in the rippled and buckled phase