Fixes to build with an old version of gcc