Fixes to build better with new versions of GCC

Change-Id: I6b04d1d9b2800885fe7b8a8b50b24f0f82a767ae