Self-consistent calculations of elastic constants of polycrystalline graphite