Near-MDS codes from elliptic curves