mysql: fix build on freebsd
Merge pull request #3003 from camlunity/mysql_freebsd

mysql: fix build on freebsd