Estimating the Long-Memory Parameter in Nonstationary Processes Using Wavelets