Minor fix in external library detection