Add fix for OS X pasteboard.

This should have no impact on non-Darwin systems.