BUG: remove static from function

gcc 4.1.2 (e.g. in red hat 5) will miscompile the function when
inlining. Without static it will not inline solving the issue.
Closes gh-5163