implement Wengier Wu's workaround for clipboard on OSX