[DF-4476] MacOS compilation fixes