build fixes for gcc