fix build errors for linaro toolchain (gcc-4.7)