Fix the build if one of the optional components isn't found.

Also revert previously unsuccessful attempts on that.