Support old swift-middleware

Fix for error "Failed to record metering data: 'counter_unit'"