linaro build fixes

Thanks Jason