Perimeter as relaxed Minkowski content in metric measure spaces