Compatibility fixes for IE9+