Added fallback if curl is not available.