Update add-externals.php

fixed infinite loop