Added compatibility for other browsers