Two US supermarket chains have fallen victim to identity fraud after hackers broke into the grocers' computer networks and stole credit and debit card details.