1) Import one of the accounts first, and along the way use the other account's account as the 'expense' account for the transaction, creating a transfer. Then import the other account and match the transfer that now exists with the imported version of the transfer, which will eliminate the duplicates.
or
2) Do what you're doing now, but then delete all of the transfers from one of the accounts, and then add the that account account to the remaining transfers in the other account.