portability fixes for wspy project