Berry's Geometrical Phase for Noncyclic Hamiltonians