Interplay Between Ferroelectricity and Surface Chemistry in BaTiO3