GCC 4.7 build fixes

This should be the last of the batch