Fix for Gentoo bug #510730 https://bugs.gentoo.org/show_bug.cgi?id=510730