Spectral determinants as a non-perturbative completion of the topological string