Juan Martin del Potro kept his cool in the Arena Zagreb to complete a 6-4 6-7 6-3 7-5 victory over Ivo Karlovic.