portability fixes (headers)