fixing build on *BSD