Output the correct library filename with --dep-info

Fixes #12174.
auto merge of #12176 : kballard/rust/dep-info-lib-filename, r=alexcrichton

Fixes #12174.