Ultrahigh stretching bond force constants of linear chains of carbon and boron nitride