tools: Fix cmake build on FreeBSD 10.1