Soliton-like solutions for the nonlinear schrödinger equation with variable quadratic hamiltonians