Add datadir environment variable.