ie9 compatibility. fixes #6