Bind event to close modal when clicking on overlay