Copy to clipboard more robustly.