Computing the Sparse Solution to Fourier Extension of Nonperiodic Function