Fixed searching libscm first during linking.