Do not "throw" error if dependency is weak

I understand that the packaging system will be refactored before 1.0, but for now this should be a satisfactory workaround for the long-standing issue #1358.