Iran frees South Korean ship, captain amid dispute over frozen funds