Israel, Hamas agree to 12-hour Gaza cease-fire