fixes for old webkits (e.g. Safari 5)