Update modal.js to work with bootstrap 3.3.1

To work with bootstrap 3.3.1. Ref #2970