Least-squares finite elements for distributed optimal control problems