Various portability modifications.