Supports async overflow by flushing with a sync read. Also changed libcommon to a shared lib