Unit tests: changing the mode with runkit causes issues with static vars
only use runkit functions if runkit isn't loaded
Merge pull request #443 from terrafrost/runkit-fix

Unit tests: changing the mode with runkit causes issues with static vars

* terrafrost/runkit-fix:
  only use runkit functions if runkit isn't loaded
  Unit tests: changing the mode with runkit causes issues with static vars