Use the new media dir API on 5.0+