shlibsign: Properly detect executable name on OS/2 and Windows.