Compile fix for freebsd 9.2
Merge pull request #170 from sunyc/master

Compile fix for freebsd 9.2