Linaro compile bugfixes
fix GCC 4.9 compilation errors