return a function to global

A function previous believed to be local was being used by the
perl API. It was made static in commit 57345149b059dfbf64c1f539bba682064b7c2972
This is a partial reversion of that commit.