Japanese trade deficit as yen weakens