Frequency- and wavelength-modulation spectroscopies: Comparison of experimental methods using an AlGaAs diode laser