NCR buys retail software provider