Mean value property and subdifferential criteria for lower semicontinuous functions