Fix bug in test helper function clear_clipboard().