make sure errno is not changed during fail_if

Signed-off-by: Mattias Andrée <maandree@operamail.com>