Greece says it is still hopeful for a last-ditch deal to avoid defaulting on its debt, as bank customers rushed to withdraw money from their accounts.