Bugfix: Use a mutex to control non-curses output Without this, there is no guarantee writes won't overlap (and it happens quite a bit on Windows with the bitforce driver)