Structure of the ammonia dimer studied by density functional theory