lib/loopdev.c: reset errno before strtol() call

Fixed unsuccessfully atempt to find unused loop devices if first 8
devices already used and /dev/loop directory exists.