Fixes to library command to avoid ugly names under windows