Theory of capillary viscometers taking into account surface tension effects