Reset the errno before relying on it in strtol.