Harmonic oscillator with variable mass