Entanglement dynamics in a two-mode nonlinear bosonic Hamiltonian