The Scot came from a set down to reach the last 32 at a grand slam for the first time.