Thousands flee Malaysia floods, dam wall broken