add function defvar: export a default value to an environment variable if not set or empty

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