fix build failure on freebsd 7