Flat surfaces and determinants of Laplacians