Portability fixes for libspice.