Hungary's incoming prime minister has said he'll stop the country's withdrawal from the International Criminal Court (ICC).