Recognize shared libraries when linking
Only collect shared libs on *nix
Proper conditial
Merge pull request #3397 from Yoplitein/master

Recognize shared libraries as valid files when linking