lib: allow setting float variables as integers