Fix mouse capture on Mac.