Magnetic field effect on the third harmonic generation in quantum well wires with triangular cross-section