[geometry] Applied patch from Philipp Reh removing use of named constant max_segments_per_section due to problems with GCC 4.6. TODO: to be reviewed.