Make pasteDiv removal compatible with all the browsers