allow exportVar to be determined dynamically

fixes issue #14