Use traditional "shrink-to-fit" idiom

This restores build with libstd++ debug mode (GCC 4.6).