André-Quillen homology via functor homology