Adding a flush_events method to the MacOSX backend

See issue #197