Better dylib skipping based on Alex Crichton code