GCC 4.7 compiler fixes