The effect of inhomogeneities on dark energy constraints