Transition some functions to forprimes
Fixes for 5.6 (sigh)
Make sure non-XS can use forprimes properly