Fix ctypes and gibbs tests on windows