fix Issue 10059 - export doesn't work for variable declarations

http://d.puremagic.com/issues/show_bug.cgi?id=10059