We assume that in $d$ dimensions there are $d$ polarizations.
For 1D we have that $N = \frac{L}{2\pi}\int dk$, hence $g(\omega) = \frac{L}{2\pi v}$.
For 1D we have that $N = \frac{L}{2\pi}\int_{-k}^{k} dk$, hence $g(\omega) = \frac{L}{\pi v}$.
For 2D we have that $N = 2\left(\frac{L}{2\pi}\right)^2\int d^2k = 2\left(\frac{L}{2\pi}\right)^2\int 2\pi kdk$, hence $g(\omega) = \frac{L^2\omega}{\pi v^2}$.