Remove unused var, properly clean windows shared lib