Fix some gcc 4.7 toolchain errors