Australia close deal on submarines