Nanomechanical basis for imaging soft materials with tapping mode atomic force microscopy