Quantization of Gauge Theories with Linearly Dependent Generators