fix check for wrong return value of unsetenv()