lib: fix guard expression in timer.unref()