PURPOSE: This phase I trial is studying the side effects and best dose of imatinib mesylate when given together with cladribine and cytarabine in treating patients with refractory or relapsed acute myeloid leukemia or blastic phase chronic myelogenous leukemia.