Midfielder Charlie Adam signs for Dundee FC