[m][2427] Add fix for building on FreeBSD by bels, thanks!