WebM: properly clean up event listeners