lib/curl: use more precise return types

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>