Replace std::os::close with libc::close

std::os::close was remove recently.