Calculate PhantomJS width instead of using a fixed value.