The altitude and the median from vertex A of triangle ABC are 4 and 5 units long, respectively. The anlge determined by AB and the median is bisected by the altitude. Find AC.