Fix Minitest exit hook hack to handle Minitest 5

Extends Minitest exit hook workaround to handle Minitest 5 in addition to previous versions of Minitest: this will prevent tests from running twice under certain circumstances.

Relates to:
https://github.com/burke/zeus/issues/356
https://github.com/burke/zeus/issues/475