Compact H II regions in the far-infrared