Quantum mechanically induced Hopf term in the O(3) nonlinear sigma model