Fix build on freebsd 8.2

Change-Id: I2b545d327a5e342a27f168f8304b494b2cdcc601
Merge pull request #1 from avsej/master

Fix build on freebsd 8.2