mouse_mode implementation on OS X