Iran frees South Korean ship it held amid dispute over funds