Revert "Drop support for pre-c++11 compilers."

The breakage this fixed can be worked around without removing support.

This reverts commit 84a13dc576496f1227665259c61f86184f452f51.
Fix build on gcc < 4.7