Inline some shims in the os module