Portability fixes.