configure: Move list of external libs to a separate variable