Fix regression in 89b8966 expecting global rivets reference

89b8966 regressed the fix for #146 in 365e32e.
Merge pull request #167 from whiteinge/global-ref-regression

Fix regression in 89b8966 expecting global rivets reference