Convert dependencies to a proper list