Refresh function fix for non-infinite carousels

Fix https://github.com/kenwheeler/slick/issues/429