Somewhat better fix for building on FreeBSD

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>