Fix compilation on FreeBSD
Not tested.
The log:
https://build.kde.org/job/Extragear/job/krita/job/kf5-qt5%20FreeBSDQt5.13/360/console
The idea is taken from a similar bug report:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235996
Many thanks in advance for reviewing.