Fix pasteboard issue on OS X