To make it work on localhost:
We will need to add few lines in the function zg_lw_setcookie()
Replace the below line :
setcookie("WP-LastViewedPosts", serialize($zg_cookiearray), (time()+($zg_cookie_expire*86400)), $zg_path_url, $zg_blog_url_dot, 0);
with:
if($_SERVER['HTTP_HOST'] == 'localhost'):
setcookie("WP-LastViewedPosts", serialize($zg_cookiearray), false, "/", false, 0);
else:
setcookie("WP-LastViewedPosts", serialize($zg_cookiearray), (time()+($zg_cookie_expire*86400)), $zg_path_url, $zg_blog_url_dot, 0);
endif;