Fixes to allow building with Linaro 4.7 toolchain