Fix building in some environments