Don't fail on nonexisting files when building without static libraries

Taken from Gentoo ebuild patch.