Ab initio calculations of Born charges in ferroelectrics with a perovskite structure