Make `check_print_stats` a static function.

Not sure why, but this fixed a "duplicate symbol" error when embedding
this framework in a project.