Support GTest for FreeBSD platforms (9.x)

Patch by Viktor Kutuzov!