* Fixes #28 for BSD systems * Porting PR #196 to BSD systems Signed-off-by: Hideki Saito <saito@fgrep.org>