Angelina Jolie, Brad Pitt reach custody agreement