Japanese prime minister makes surprise visit to Poland