fix freestanding build