Chaotic oscillations and hysteresis in a bistable system