more gcc build fixes