Rafael Nadal recovered from a set and a break down to beat qualifier Duje Ajdukovic at the Swedish Open.