Solution of fractional integro-differential equations using least squares and shifted Legendre methods