Ported to GCC 4.9