Japan trade deficit as yen weakens