gcc build fixes