Dont use unix-specific functions: port to boost