Kasteleyn operators from mirror symmetry