Imatinib mesylate may stop the growth of tumor cells by blocking the enzymes necessary for tumor cell growth. Phase II trial to study the effectiveness of imatinib mesylate in treating patients who have progressive, refractory, or recurrent stage II or stage III testicular cancer or stage II or stage III ovarian cancer following cisplatin-based chemotherapy