Fixed memory leak in curl callback function, removed debug flag for default compilation