support build vars in refs (issue #5)