Add compatibility macros for older GCC versions

GCC-C++ versions before 4.8 implemented only a subset of the C++11
standard. These macros emulate some of the functions so that the code
can be compiled by GCC-C++ > 4.4.