Thai junta agrees to referendum on draft charter