Ported to GCC 4.6