Improve compatibility with non-Webkit browsers