Coherent perfect absorption in a homogeneously broadened two-level medium