Calculating the effective mode area of a waveguide mode