Include changes from Ian Smith

https://github.com/IamSmith/modal.js/commit/903bbb0bfbe832ecf1a241d039447e85d8050171