Pakistan-Afghan armies agree to enhance security on both sides of border