The Taoiseach has criticised Hungary for saying it would begin withdrawing from the International Criminal Court.