Fixes for portability.