Fix build on FreeBSD with libc++

Change-Id: Ib51b05eb3f7c5d1288bee0f9f738ab1f37251c3e
Reviewed-on: https://gerrit.libreoffice.org/9722
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>