Fix the pagination component that is broken in Bootstrap 3.

Bug reference: https://github.com/angular-ui/bootstrap/issues/766