Dynamic glass transition: Bridging the gap between mode-coupling theory and the replica approach