fix compilation with certain versions of gcc