Gotovina to appear in Madrid court Thursday