Javascript IE8 background-size: cover/contain solution