Output the correct library filename with --dep-info

Fixes #12174.