Black hole entropy and boundary conditions