FreeBSD build patches

Imported from http://svnweb.freebsd.org/ports/head/www/qupzilla/files/
See #1206